import Vue from 'vue'
import Vuex from 'vuex'

import tabbar from './tabbar/tabbar.js'
import location from './location/location.js'
import user from './user/user.js'
import theme from './theme/theme.js'

Vue.use(Vuex)

var vues = {
	getters: Object.assign({},
		tabbar.getters,
		location.getters,
		user.getters,
		theme.getters
	),
	state: Object.assign({},
		tabbar.state,
		location.state,
		user.state,
		theme.state
	),
	mutations: Object.assign({},
		tabbar.mutations,
		location.mutations,
		user.mutations,
		theme.mutations
	),
	actions: Object.assign({},
		tabbar.actions,
		location.actions,
		user.actions,
		theme.actions
	)
}

// console.log(vues)

const store = new Vuex.Store(vues)
export default store
